App({
  onLaunch() {
    // Initialize app
    const userInfo = wx.getStorageSync('userInfo') || null;
    this.globalData = {
      userInfo: userInfo,
      isLoggedIn: !!userInfo
    };
  },
  globalData: {
    userInfo: null,
    isLoggedIn: false
  }
});